﻿<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <meta charset="utf-8" />
    <link href="/Web/CSS/JZ.css" rel="stylesheet" />
    <link href="/Web/CSS/reset.css" rel="stylesheet" />
    <link href="../CSS/regit.css" rel="stylesheet" />

    <script src="../JS/jquery-1.11.2.min.js"></script>
    <script src="../JS/avalon1.47.js"></script>
    <script src="../JS/jquery-migrate-1.1.0.min.js"></script>
    <style>
        body {
            font: 12px/1.5 "Microsoft YaHei",SimSun,Tahoma, Helvetica, Arial, sans-serif;
        }

        .listUl {
            list-style: square inside;
        }

            .listUl li {
                margin-top: 10px;
                font-size: 13px;
                font-family: "宋体";
            }

            .listUl .listDate {
                float: right;
            }

        .pageNum {
            width: 30px;
        }

        .pageLink {
            margin-top: 10px;
            text-align: center;
        }

            .pageLink span {
                margin: 0 5px;
            }

        @CHARSET "UTF-8";

        #pages {
            width: 100%;
            clear: both;
            text-align: center;
            font-size: 12px;
            font-family: Verdana, Arial, Helvetica, sans-serif;
            margin-top: 20px;
            margin-bottom: 20px;
            color: #8d8d8d;
        }

            #pages a, #pages span {
                margin-left: 3px;
                margin-right: 3px;
                width: 22px;
                height: 22px;
                line-height: 22px;
                border: 1px solid #e0e0e0;
                color: #aaa;
                display: inline-block;
            }

                #pages a:hover {
                    border: 1px solid #a0a0a0;
                }

            #pages span {
                background: #f0f0f0;
                color: #ffffff;
            }

            #pages span {
                font-weight: bold;
                position: relative;
                top: 0px;
            }

            #pages a.previous {
                width: 25px;
                position: relative;
                top: 0px;
            }

            #pages a.next {
                width: 25px;
                position: relative;
                top: 0px;
            }

        .alumniReg .regLabel {
            float: left;
            width: 250px;
            text-align: right;
            line-height: 25px;
        }

        .alumniReg .regTxt {
            font-size: 13px;
            height: 27px;
        }

        .baocun {
            float: left;
            width: 160px;
            height: 40px;
            background-color: green;
            text-align: center;
            line-height: 40px;
            margin-top: 40px;
            color: white;
            margin-left: 100px;
        }

        .reback {
            float: left;
            width: 160px;
            height: 40px;
            background-color: #ff6a00;
            text-align: center;
            line-height: 40px;
            margin-top: 40px;
            color: white;
            margin-left: 100px;
        }
    </style>
    <script>
        var model = avalon.define({
            $id: "Content",
            type: 0,
            xmdata: [],
            userdata:{},
            jzdata: { xmmc: "", xmdm: "", xm: "", lxdh: "", lxr: "", je: "", nj: "", bj: "", sfnm: "", sm: "" },
            selxm: function (item) {
                model.jzdata.xmmc = item.xmmc;
                model.jzdata.xmdm = item.xmdm;

                model.type = 1;
            },
            reback: function () {
                model.type = 0
            },
            juanzen: function () {

                if (model.jzdata.xm && model.jzdata.je && model.jzdata.lxdh) {
                    model.jzdata.sfnm = $("#sfwx").prop("checked") ? "0" : "1";
                    $.getJSON("/API/VIEWAPI.ashx?Action=Commanage_ADDORDER&r=" + Math.random(), model.jzdata.$model, function (resultData) {
                        if (resultData.ErrorMsg == "") {
                            top.location.href = "/VIEW/CWPay.aspx?ddh=" + resultData.Result;
                        }
                    });
                } else {
                    alert("关键信息不能为空")
                }
                
             
            }

        })
        avalon.ready(function () {
            if (getquery("t")==1) {
                $(".listNav").hide()
                model.userdata = JSON.parse(getCookie('userdata'));
                if (model.userdata.xm) {
                    model.jzdata.xm = model.userdata.xm;

                    model.jzdata.bj = model.userdata.bj;
                    model.jzdata.lxdh = model.userdata.now_smscode;

                    
                }
            }
            $.getJSON("/API/VIEWAPI.ashx?Action=Commanage_GETJZXM&r=" + Math.random(), {}, function (resultData) {
                if (resultData.ErrorMsg == "") {
                    model.xmdata = resultData.Result;
                }
            });

            $(".navItem").live('click', function () {
                $(".navItem").removeClass('active');
                $(this).addClass('active');

            })
        })
        function getCookie(name) {
            var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");

            if (arr = document.cookie.match(reg))

                return unescape(arr[2]);
            else
                return null;
        }
        function setCookie(name, value, t) {
            var Days = 30;
            var exp = new Date();
            if (t) {
                exp.setTime(exp.getTime() + parseInt(t) * 24 * 60 * 60 * 1000);
            } else {
                exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);
            }
            if (window.location.toString().indexOf("qijieyun") > 0) {
                document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString() + ";path=/;domain=qijieyun.com";
            } else {
                document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString() + ";path=/";
            }
        }
        function getquery(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
            var r = window.location.search.substr(1).match(reg);
            if (r != null) return unescape(r[2]); return null;
        }
    </script>
</head>
<body ms-controller="Content">

    <div class="eyeview content list alumniReg">
        <div class="listNav">

            <div class="s_center" style="margin-top: 10px;">
                <!--beginblock id=jjh-bg -->
                <img id="bg_1" src="/Web/image/bg_8.jpg" style="display: inline;">
            </div>

        </div>

        <div class="listContent zy-lico">
            <div class="pageCursor c1" style="text-align: left;">
                <!--beginblock id=jjh-dqwz styleuuid=e3d23819b03741a3841da42fc6275a42 -->
                当前位置：<a href="main.html">首页</a>  &gt;<a>回馈母校</a>
                <!--endblock -->
            </div>
            <ul class="jzxm_list zy-dt" style="border: none !important;" ms-if="type==0">

                <li>
                    <!--beginblock id=jjh-jzxm styleuuid=e3d23819b03741a3841da42fc6275a42 -->
                    <dl style="padding-bottom: 20px; margin-right: 15px;" ms-repeat-item="xmdata">
                        <a>
                            <img src="../image/jz1.jpg" width="155" height="90"></a>
                        <dt><a>{{item.xmmc}}</a></dt>

                        <dd><a ms-click="selxm(item)">我要捐赠</a></dd>
                    </dl>




                    <div class="pageLink" style="display: none">
                        <div id="pages"><a href="" class="previous">&lt;</a><span>1</span><a href="" class="next">&gt;</a></div>
                    </div>
                    <!--endblock -->
                </li>

            </ul>

            <div class="regLeft" style="margin-top: 20px; width: 95%; overflow: auto" ms-if="type==1">
                <div class="regLine">
                    <div class="regLabel"><span class="regMust"></span>捐赠项目：</div>
                    <div class="regField">
                        <div class="regField">
                            <input type="text" class="regTxt" disabled="disabled" ms-duplex="jzdata.xmmc" style="width: 238px" maxlength="50">
                        </div>
                    </div>
                </div>
                <div class="regLine">
                    <div class="regLabel"><span class="regMust">*</span>捐赠者姓名/单位名称：</div>
                    <div class="regField">
                        <div class="regField">
                            <input type="text" class="regTxt" ms-duplex="jzdata.xm" style="width: 238px" maxlength="50">
                        </div>
                    </div>
                </div>
                <div class="regLine">
                    <div class="regLabel"><span class="regMust">*</span>捐赠总额(元/人民币)：</div>
                    <div class="regField">
                        <div class="regField">
                            <input type="text" class="regTxt" ms-duplex="jzdata.je" style="width: 238px" maxlength="50">
                        </div>
                    </div>
                </div>
                <div class="regLine">
                    <div class="regLabel"><span class="regMust">*</span>联系人电话：</div>
                    <div class="regField">
                        <div class="regField">
                            <input type="text" class="regTxt" ms-duplex="jzdata.lxdh" style="width: 238px" maxlength="50">
                        </div>
                    </div>
                </div>
                <div class="regLine">
                    <div class="regLabel"><span class="regMust"></span>联系人年级：</div>
                    <div class="regField">
                        <div class="regField">
                            <input type="text" class="regTxt" ms-duplex="jzdata.nj" style="width: 238px" maxlength="50">
                        </div>
                    </div>
                </div>
                <div class="regLine">
                    <div class="regLabel"><span class="regMust"></span>联系人班级：</div>
                    <div class="regField">
                        <div class="regField">
                            <input type="text" class="regTxt" ms-duplex="jzdata.bj" style="width: 238px" maxlength="50">
                        </div>
                    </div>
                </div>
                <div class="regLine">
                    <div class="regLabel"><span class="regMust"></span>将捐赠信息显示在网页上：</div>
                    <div class="regField">
                        <div class="regField">
                            <input type="checkbox" id="sfwx" checked="checked" style="height: 20px; width: 20px; }" />


                        </div>
                    </div>
                </div>
                <div class="regLine">
                    <div class="regLabel"><span class="regMust"></span>捐赠说明：</div>
                    <div class="regField">
                        <div class="regField">
                            <input type="text" class="regTxt" ms-duplex="jzdata.sm" style="width: 238px" maxlength="50">
                        </div>
                    </div>
                </div>

                <div>
                    <a href="javascript:void(0)" class="reback" style="" ms-click="reback()">返回项目列表</a> <a href="javascript:void(0)" class="baocun" style="" ms-click="juanzen()">立即捐赠</a>
                </div>
            </div>
        </div>
        <div class="cl"></div>

    </div>
</body>
</html>
